<?php
namespace App\Http\Controllers\Api;

use App\Requests\AuthRequest;
use App\Requests\PhoneRequest;
use App\Requests\RegisterRequest;
use App\Services\RegisterService;
use Carbon\Carbon;
use Framework\BaseController;
use Framework\Hope;



class RegisterController extends BaseController
{


    /** 注册
     * @param RegisterRequest $request
     * @param RegisterService $RegisterService
     * @return string
     */
    public function register(RegisterRequest $request, RegisterService $RegisterService)
    {
        $phone = $request->phone();
        $code = $request->code();
        $password = $request->password();
        $nickname = $request->nickname();
        $real_name = $request->real_name();
        $idcard_num = $request->idcard_num();
        $info = $RegisterService->register($phone,$code,$password,$nickname,$real_name,$idcard_num);
        $this->retSuccess($info);
    }



}
